﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
    CodeFile="FleetCompany.aspx.cs" Inherits="carinsurance_fleet_FleetCompany" %>

<%@ Register Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI" TagPrefix="asp" %>
<asp:Content ID="Content3" ContentPlaceHolderID="cphPageTitle" runat="Server">
    <h1>
        <asp:Label runat="server" Text="Fleet Company" ID="lblPageName"></asp:Label></h1>
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:Label runat="server" Text="<%$Resources:General,LangOption%>" Visible="false"
        ID="lblLangOption" /><asp:HiddenField ID="hidLastTab" Value="0" runat="server" />
    <asp:HiddenField ID="hidCallType" Value="0" runat="server" />
    <asp:HyperLink runat="server" Visible="false" ID="lnkNewCarUsage" NavigateUrl="#"
        Text="New"></asp:HyperLink>
    <div class="bc2">
        <asp:UpdatePanel ID="UpdatePanel4" runat="server">
            <ContentTemplate>
                <asp:Label runat="server" ID="lblNewCallMessage" /></ContentTemplate>
        </asp:UpdatePanel>
        <asp:Label runat="server" ID="lblSiteLocation" Text="You are here : " CssClass="bclist" />
        <asp:SiteMapPath SiteMapProvider="SiteUserSiteMapProvider" ID="smpProvider" runat="server"
            PathSeparator=" : ">
            <PathSeparatorStyle CssClass="bcarrow" />
            <CurrentNodeStyle CssClass="bclist" />
            <NodeStyle CssClass="bclink" />
            <RootNodeStyle CssClass="bclink" />
        </asp:SiteMapPath>
        <div class="clear">
        </div>
    </div>
    <div style="display:none;">
        <asp:TextBox ID="txtCompanyId" runat="server" CausesValidation="false" Text="0"></asp:TextBox>
    </div>
    <div id="divCompany" class="toggle" runat="server">
        <div class="title opened" id="opened1">
            <img src="../../images/icons/dark/imagesList.png" alt="" class="titleIcon" />
            <h6>
                <asp:Label ID="lblLastCallStatusCaption" runat="server" Text="Fleet Company" />
                <asp:Label ID="lblLastCallStatusMessage" runat="server" Text="" ForeColor="Red" />
            </h6>
        </div>
        <div class="form">
            <fieldset class="step">
                <asp:UpdatePanel ID="upnlCompany" runat="server">
                    <ContentTemplate>
                        <asp:Panel ID="pnlCompany" runat="server">
                            <div class="formRow">
                                <asp:Label runat="server" ID="Label6" Text="Company Name" />
                                <div class="formRight">
                                    <asp:TextBox ID="txtCompanyName" runat="server" Width="300px" MaxLength="100"></asp:TextBox>
                                    <asp:RequiredFieldValidator runat="server" ID="rfvCompanyName" ControlToValidate="txtCompanyName"
                                        ErrorMessage="" Text="*" ValidationGroup="company" Display="Dynamic"></asp:RequiredFieldValidator>
                                    <asp:RegularExpressionValidator ID="revCompanyName" runat="server" ControlToValidate="txtCompanyName"
                                        ValidationExpression="^([\u0000-\uDFFF']{1,100})$|^([a-zA-Z''-'\s]{1,100})$"
                                        ValidationGroup="company" ErrorMessage="" Text="*"></asp:RegularExpressionValidator>
                                </div>
                                <div class="clear">
                                </div>
                            </div>
                            <div class="formRow">
                                <asp:Label runat="server" ID="Label3" Text="Contact Person" />
                                <div class="formRight">
                                    <asp:TextBox ID="txtContactPerson" runat="server" Width="300px" MaxLength="100"></asp:TextBox>
                                    <asp:RequiredFieldValidator runat="server" ID="rfvContactPerson" ControlToValidate="txtContactPerson"
                                        ErrorMessage="" Text="*" ValidationGroup="company" Display="Dynamic"></asp:RequiredFieldValidator>
                                    <asp:RegularExpressionValidator ID="revContactPerson" runat="server" ControlToValidate="txtContactPerson"
                                        ValidationExpression="^([\u0000-\uDFFF']{1,75})$|^([a-zA-Z''-'\s]{1,75})$" ValidationGroup="company"
                                        ErrorMessage="" Text="*"></asp:RegularExpressionValidator>
                                </div>
                                <div class="clear">
                                </div>
                            </div>
                            <div class="formRow">
                                <asp:Label runat="server" ID="Label2" Text="Company Address" />
                                <div class="formRight">
                                    <asp:TextBox ID="txtAddress" runat="server" Width="300px" MaxLength="300"></asp:TextBox>
                                    <asp:RequiredFieldValidator runat="server" ID="rfvAddress" ControlToValidate="txtAddress"
                                        ErrorMessage="" Text="*" ValidationGroup="company" Display="Dynamic"></asp:RequiredFieldValidator>
                                    <asp:RegularExpressionValidator ID="revAddress" runat="server" ControlToValidate="txtAddress"
                                        Display="Dynamic" ValidationExpression="^([\u0000-\uDFFF']{5,500})$|^([a-zA-Z''-'\s]{5,500})$"
                                        ValidationGroup="company" ErrorMessage="" Text="*"></asp:RegularExpressionValidator>
                                </div>
                                <div class="clear">
                                </div>
                            </div>
                            <div class="formRow">
                                <asp:Label runat="server" ID="Label1" Text="<%$Resources:Proposal,DistrictSub%>" />
                                <div class="formRight">
                                    <asp:TextBox ID="txtSubDistrict" runat="server" MaxLength="100" Width="300px"></asp:TextBox>
                                    <asp:RequiredFieldValidator runat="server" ID="rfvSubDistrict" ControlToValidate="txtSubDistrict"
                                        ErrorMessage="" Text="*" ValidationGroup="company"></asp:RequiredFieldValidator>
                                </div>
                                <div class="clear">
                                </div>
                            </div>
                            <div class="formRow">
                                <asp:Label runat="server" ID="Label5" Text="<%$Resources:Proposal,StateProvince%>" />
                                <div class="formRight">
                                    <asp:TextBox ID="txtDistrict" runat="server" MaxLength="100" Width="300px"></asp:TextBox>
                                    <asp:RequiredFieldValidator runat="server" ID="rfvDistrict" ControlToValidate="txtDistrict"
                                        ErrorMessage="" Text="*" ValidationGroup="company"></asp:RequiredFieldValidator>
                                </div>
                                <div class="clear">
                                </div>
                            </div>
                            <div class="formRow">
                                <asp:Label runat="server" ID="Label7" Text="<%$Resources:Proposal,Province%>" />
                                <div class="formRight">
                                    <asp:TextBox ID="txtProvince" runat="server" MaxLength="100" Width="300px"></asp:TextBox>
                                    <asp:RequiredFieldValidator runat="server" ID="rfvProvince" ControlToValidate="txtProvince"
                                        ErrorMessage="" Text="*" ValidationGroup="company"></asp:RequiredFieldValidator>
                                </div>
                                <div class="clear">
                                </div>
                            </div>
                            <div class="formRow">
                                <asp:Label runat="server" ID="Label8" Text="<%$Resources:Proposal,PostalCode%>" />
                                <div class="formRight">
                                    <asp:TextBox ID="txtPostalCode" runat="server" MaxLength="5" Width="160px"></asp:TextBox>
                                    <asp:RequiredFieldValidator runat="server" ID="rfvPostalCode" ControlToValidate="txtPostalCode"
                                        ErrorMessage="" Text="*" ValidationGroup="company"></asp:RequiredFieldValidator>
                                    <asp:RegularExpressionValidator ID="revPostalCode" runat="server" ControlToValidate="txtPostalCode"
                                        Display="Dynamic" ValidationGroup="company" ErrorMessage="<%$Resources:General,Notvalid%>"
                                        ValidationExpression="^[0-9]+(\[0-9])?$"></asp:RegularExpressionValidator>
                                </div>
                                <div class="clear">
                                </div>
                            </div>
                            <div class="formRow">
                                <asp:Label runat="server" ID="Label4" Text="Contact No. 1" />
                                <div class="formRight">
                                    <asp:TextBox ID="txtContactNo1" runat="server" Width="300px" MaxLength="100"></asp:TextBox>
                                    <asp:RequiredFieldValidator runat="server" ID="rfvContactNo1" ControlToValidate="txtContactNo1"
                                        ErrorMessage="" Text="*" ValidationGroup="company" Display="Dynamic"></asp:RequiredFieldValidator>
                                    <asp:RegularExpressionValidator ID="revContactNo1" runat="server" ControlToValidate="txtContactNo1"
                                        Display="Dynamic" ValidationGroup="company" ErrorMessage="<%$Resources:General,Notvalid%>"
                                        ValidationExpression="^[0-9]+(\[0-9])?$"></asp:RegularExpressionValidator>
                                </div>
                                <div class="clear">
                                </div>
                            </div>
                            <div class="formRow">
                                <asp:Label runat="server" ID="lblTitleUpPremium" Text="Contact No. 2" />
                                <div class="formRight">
                                    <asp:TextBox ID="txtContactNo2" runat="server" Width="300px" MaxLength="100"></asp:TextBox>
                                </div>
                                <div class="clear">
                                </div>
                            </div>
                            <div class="formRow">
                                <asp:Label runat="server" ID="lblTitleUpPremiumWOD" Text="Email Address" />
                                <div class="formRight">
                                    <asp:TextBox ID="txtEmailAddress" runat="server" Width="300px" MaxLength="100"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="rfvEmailAddress" runat="server" Text="*" ValidationGroup="company"
                                        ErrorMessage="" ControlToValidate="txtEmailAddress" Display="Dynamic"></asp:RequiredFieldValidator>
                                    <asp:RegularExpressionValidator ID="revEmailAddress" Text="<%$Resources:General,Notvalid%>"
                                        runat="server" ValidationGroup="company" ErrorMessage="" ControlToValidate="txtEmailAddress"
                                        ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" Display="Dynamic"></asp:RegularExpressionValidator>
                                </div>
                                <div class="clear">
                                </div>
                            </div>
                            <div class="formRow">
                                <asp:Label runat="server" ID="Label60" Text="To Agent" />
                                <div class="formRight">
                                    <asp:DropDownList ID="ddlAgentList" runat="server" Width="305px">
                                        <asp:ListItem Value="1" Text="Broker1"></asp:ListItem>
                                        <asp:ListItem Value="2" Text="Broker2"></asp:ListItem>
                                    </asp:DropDownList>
                                </div>
                                <div class="clear">
                                </div>
                            </div>
                            <div class="formRow">
                                &nbsp;
                                <div class="formRight">
                                    <asp:Button ID="btnSubmit" runat="server" Text="<%$Resources:General,Submit%>" ValidationGroup="company"
                                        OnClick="btnSubmit_Click" CssClass="blueB ml10" OnClientClick="return SubmitSubmitConfirm();" />
                                        &nbsp;
                                    <asp:Button ID="btnNew" runat="server" Text="<%$Resources:General,NEW%>"
                                        OnClick="btnNew_Click" CssClass="blueB ml10" OnClientClick="return SubmitNewConfirm();" />
                                        &nbsp;
                                    <asp:Button ID="btnView" runat="server" Text="View"
                                        OnClick="btnView_Click" CssClass="blueB ml10" />
                                        &nbsp;&nbsp;
                                        <asp:Label ID="lblMessage" runat="server" Font-Bold="true"></asp:Label>
                                </div>
                                <div class="clear">
                                </div>
                            </div>
                        </asp:Panel>
                    </ContentTemplate>
                </asp:UpdatePanel>
            </fieldset>
        </div>
    </div>

    <script type="text/javascript">
        function SubmitSubmitConfirm() {
            var _retVal = false;
            if (Page_ClientValidate('company')) {
                _retVal = confirm('<%=GetGlobalResourceObject("General", "ConfirmSubmit")%>');
            }
            else {
                ShowDiv();
            }
            return _retVal;
        }

        function SubmitNewConfirm() {
            var _retVal = false;
            _retVal = confirm('<%=GetGlobalResourceObject("General", "ConfirmRESETMessage")%>');
            return _retVal;
        }

    </script>

</asp:Content>
